<template>
  <div>
    <el-button type="info" @click="logout">退出</el-button>
  </div>
</template>

<script>
export default {
  data() {
    return {}
  },
  created() {},
  mounted() {},
  methods: {
    logout() {
      // 清除token
      window.sessionStorage.clear()
      // 重定向到登录页面
      this.$router.push('/login')
    }
  }
}
</script>

<style scoped lang="less"></style>
